import 'package:h_flutter_119/page/getx/test/interceptor/Interceptor.dart';
import 'package:h_flutter_119/page/getx/test/interceptor/LoginInterceptChain.dart';

class LoginNextInterceptor implements Interceptor{

  Function action;

  LoginNextInterceptor(this.action);

  @override
  void interceptor(LoginInterceptChain chain) {
    if(LoginInterceptChain.isLogin()){
      // 如果已经登录执行当前的任务
      action();
    }
    chain.process();
  }

}